<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="author" content="甘忠祥">
    <title></title>
    <style>
        .container{
            width: 500px;
            margin: 100px auto;
        }
        ul{
            list-style: none;
        }
        .list{
            width: 500px;
            height: 60px;
            background-color: black;
            /* display: flex;
            justify-content: space-around; */
        }
        .list>li{
            float: left;
            width: 150px;
            color: white;
            line-height: 60px;
            height: 60px;
            /* width: 150px; */
            background-color: black;
            text-align: center;
            /* margin-right: 40px; */
        }
        .list>li:hover{
            color: black;
            background-color: gray;
        }
        .text{
            border: 1px solid black;
            margin-top: -18px;
            width: 538px;
        }
        .text ul{
            padding-left: 240px;
        }
    </style>
</head>

<body>
    <div class="container">
        <ul class="list">
            <li>选项一</li>
            <li>选项二</li>
            <li>选项三</li>
        </ul>
        <div class="text">
            <ul>
                <li>内容一</li>
                <li>内容一</li>
            </ul>
            <ul>
                <li>内容二</li>
                <li>内容二</li>
                <li>内容二</li>
                <li>内容二</li>
            </ul>
            <ul>
                <li>内容三</li>
                <li>内容三</li>
                <li>内容三</li>
            </ul>
        </div>
    </div>
    
<script src="./jquery.min.js"></script>
</body>
<script>
    $('.text ul').css('display','none');
    $('.list li').mouseenter(function(){
        var index = $('.list li').index(this);
        $('.text ul').eq(index).css('display','block').siblings().css('display','none')
    });
</script>
</html>